package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Objects;

import lombok.Data;

/**
 * @desc CycleStageDataAttDocDto
 * @使用场景
 */
@Data
public class CycleStageDataAttDocDto extends BaseDto implements Serializable {

  /**
   * 周期阶段资料附件文档ID
   */
  @ApiModelProperty("周期阶段资料附件文档ID")
  private String staWorSumConDocId;

  /**
   * 文档后缀
   */
  @ApiModelProperty("文档后缀")
  private String postfix;

  /**
   * 文件相对路径地址
   */
  @ApiModelProperty("文件相对路径地址")
  private String fileRelativePathAccess;

  /**
   * 来源文档关系ID
   */
  @ApiModelProperty("来源文档关系ID")
  private String sourceRelationshipId;

  /**
   * 关系类型编码 DIRECT_RELATION:直接关系 INDIRECT_RELATIONSHIP:间接关系
   */
  @ApiModelProperty("关系类型编码")
  private String relationshipType;

  /**
   * 是否是网盘引用关系 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否是网盘引用关系")
  private String isNetworkReference;

  /**
   * 文档ID
   */
  @ApiModelProperty("周期阶段资料附件文档ID")
  private String unstructuredDataId;

  /**
   * 文档名称
   */
  @ApiModelProperty("文档名称")
  private String unstructuredDataName;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    CycleStageDataAttDocDto that = (CycleStageDataAttDocDto) o;
    return (
      staWorSumConDocId == that.staWorSumConDocId &&
      postfix == that.postfix &&
      fileRelativePathAccess == that.fileRelativePathAccess &&
      sourceRelationshipId == that.sourceRelationshipId &&
      relationshipType == that.relationshipType &&
      isNetworkReference == that.isNetworkReference &&
      unstructuredDataId == that.unstructuredDataId &&
      unstructuredDataName == that.unstructuredDataName
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      staWorSumConDocId,
      postfix,
      fileRelativePathAccess,
      sourceRelationshipId,
      relationshipType,
      isNetworkReference,
      unstructuredDataId,
      unstructuredDataName
    );
  }

}
